package com.zhss.designpattern.singleton;/** * @Author: Beating Pupils * @Date: 2020/11/1 22:42 * @Description: */public class UnsafeFullSingleton {    public static class Singles {        private static Singles instance;        private Singles() {        }        public static Singles getInstance() {            //检查            if (instance == null) {                //todo 在并发执行的时候，假如这里线程1暂停。线程2继续执行，判断if(instance==null)                // 此时实例并未创建，线程2也可以进来                instance = new Singles();            }            return instance;        }    }}